import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
	warehouseId: [{ required: true, message: "仓库为必填项", trigger: "change" }],
	deviceAlias: [{ required: true, message: "设备别名为必填项", trigger: "blur" }],
	ipAddress: [{ required: true, message: "IP为必填项", trigger: "blur" }],
	deviceName: [{ required: true, message: "设备名称为必填项", trigger: "blur" }],
	deviceType: [{ required: true, message: "设备类型为必填项", trigger: "blur" }],
	portNumber: [{ required: true, message: "端口号为必填项", trigger: "blur" }],
	deviceNo: [{ required: true, message: "设备编号为必填项", trigger: "blur" }],
});